package com.yyjj.yyjj.sys.controller;


import com.yyjj.yyjj.common.result.Result;
import com.yyjj.yyjj.sys.service.IRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/sys/region")
@RequiredArgsConstructor
@Api(tags = "区域接口")
public class RegionController {

    private final IRegionService regionService;

    @ApiOperation(value = "根据关键字获取地区列表")
    @GetMapping("/findRegionByKeyword/{keyword}")
    public Result findSkuInfoByKeyword(@PathVariable("keyword") String keyword) {
        return Result.ok(regionService.findRegionByKeyword(keyword));
    }
}
